<template>
  <div>
    draft
    <!-- <van-button>编辑按钮</van-button> -->
    <ul v-for="item in draftHtmlArr" :key="item.id">
      <li>{{ item.type }}</li>
      <li v-html="item.content"></li>
      <li @click="removeHtmlArrItem(item)">删除按钮</li>
    </ul>
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex'
export default {
  computed: {
    ...mapState({
      draftHtmlArr: (state) => state.release.draftHtmlArr,
    }),
  },
  created() {
    console.log(this.draftHtmlArr, '---------------')
  },
  methods: {
    ...mapMutations(['removeDraftItem']),
    removeHtmlArrItem(item) {
      this.removeDraftItem(item)
    },
  },
}
</script>

<style></style>
